#include "SerialPort.h"
#include <memory>
#ifdef __linux__
#include "linux/LinuxSerialPort.h"
#elif _WIN32
#include "windows/WindowsSerialPort.h"
#endif

using namespace MC500;

std::shared_ptr<SerialPort> SerialPort::Create(const std::string &devName)
{
#ifdef __linux__
    return std::make_shared<LinuxSerialPort>(devName);
#elif _WIN32
    return std::make_shared<WinSerialPort>(devName);
#endif
}